<%@ Page Language="c#" MasterPageFile="~/admin/MasterPage.master" CodeFile="Agente_Listado.aspx.cs"
    AutoEventWireup="false" Inherits="web.Agente_Listado"  ResponseEncoding ="iso-8859-1"%>
<%@ Register TagPrefix="cc1" Namespace="UsrControls" Assembly="UsrControls" %>
<%@ Register TagPrefix="anthem" Namespace="Anthem" Assembly="Anthem" %>
<%@ Register TagPrefix="uc1" TagName="AreasArtisticasFiltradas" Src="~/admin/Agentes/Controls/AreasArtisticasFiltradas.ascx" %>



<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2.Export, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>
<%@ Register TagPrefix="cc2" Namespace="UsrControls" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript">
		if (document.all)
		{     document.onkeydown = function ()
			{     var key_enter= 13; // 13 = Enter
				if (key_enter==event.keyCode)
				{
				event.keyCode=0;
				document.getElementById('btnBuscar').click()
				return false;
				}
			}
		}
		
		function ValidaChar(evt){
		var key = nav4 ? evt.which : evt.keyCode;
		return ( !((key >= 1 && key <= 43) || (key >= 45 && key <= 47) || (key >= 58 && key <= 64) || (key >= 91 && key <= 96) || 
								(key >= 123 && key <=129) || (key >= 131 && key <= 159) || (key >= 166 && key <= 255) ));
		}
		
function confirmEditAspx()
{
var counter = ctl00_ContentPlaceHolder1_aspxGridAgentes.GetSelectedRowCount();

if (counter > 1)
    {
    counter = 0;
        alert("Debe seleccionar un solo registro");
        return(false);
    }
    else if (counter == 1)
    {
    counter = 0;
        return(true);
    }
    else if (counter == 0)
    {
    counter = 0;
    alert("Debe seleccionar al  menos un registro");
        return(false);
    }
}
				
    </script>

    <table id="TablaBusqueda1" cellspacing="0" cellpadding="0" width="100%" border="0"
        runat="server">
        <tr>
            <td valign="top" width="80%">
                <table id="TablaBusqueda2" cellspacing="0" cellpadding="0" width="100%" border="0"
                    runat="server">
                    <tr>
                        <td valign="top">
                            <table class="borde" id="Table3" style="table-layout: fixed" height="0" cellspacing="1"
                                cellpadding="1" width="100%">
                                
                                <tr>
                                    <td class="toolbar" >
                                    <anthem:Label ID="lblMensaje" runat="server" Visible="False" AutoUpdateAfterCallBack="True"
                                Width="100%" Height="25px"></anthem:Label>
                                        </td>
                                </tr>
                                
                                <tr>
                                    <td class="toolbar" >
                                        <table>
                                            <tr>
                                                <td>
                                                    <cc1:WccAcciones ID="WccAcciones1" runat="server" ValidateOnClickCallBackMethod="Validar"
                                                        ValidatePreCallBackFunction="function(){return accion_PreCallBack('Validar')}"
                                                        PublishOnClickCallBackMethod="Publicar" PublishPreCallBackFunction="function(){return accion_PreCallBack('Publicar')}"
                                                        DeleteOnClickCallBackMethod="Eliminar" DeclineOnClickCallBackMethod="Rechazar"
                                                        DeclinePreCallBackFunction="function(){return accion_PreCallBack('Rechazar')}"
                                                        ArchiveOnClickCallBackMethod="Archivar" ArchivePreCallBackFunction="function(){return accion_PreCallBack('archivar')}"
                                                        DeletePreCallBackFunction="delete_PreCallBack" UpdateCausesValidation="False"
                                                        AddCausesValidation="False" AddEnableCallBack="False" UpdateEnableCallBack="False"
                                                        UpdateOnClickFunction="return confirmEditAspx();"></cc1:WccAcciones>
                                                </td>
                                               
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div id="Div_Contenedor" style="overflow: auto; width: 100%" align="left" runat="server">
                                            <cc1:DataGridBase ID="dgrAgentes" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                                AllowPaging="True" CssClass="borde" BorderWidth="0px" CellPadding="1" CellSpacing="1"
                                                Width="100%" Visible="False">
                                                <ItemStyle CssClass="fila1"></ItemStyle>
                                                <HeaderStyle CssClass="encabezado"></HeaderStyle>
                                                <AlternatingItemStyle CssClass="fila2"></AlternatingItemStyle>
                                                <Columns>
                                                    <asp:TemplateColumn>
                                                        <headertemplate>
<asp:CheckBox runat="server" ID="CheckAll" onclick="javascript: return select_deselectAll (this.checked, this.id);"></asp:CheckBox>
</headertemplate>
                                                        <itemtemplate>
<asp:CheckBox runat="server" ID="chkId"></asp:CheckBox>
</itemtemplate>
                                                        <headerstyle horizontalalign="Center" width="5%" />
                                                        <itemstyle horizontalalign="Center" width="5%" />
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn HeaderText="Nro">
                                                        <edititemtemplate>
<anthem:Label runat="server" ID="lblNroEdit"></anthem:Label>
</edititemtemplate>
                                                        <itemtemplate>
<anthem:Label runat="server" ID="lblNro"></anthem:Label>
</itemtemplate>
                                                        <headerstyle width="5%" />
                                                        <itemstyle width="5%" />
                                                    </asp:TemplateColumn>
                                                    <asp:BoundColumn Visible="False" DataField="AGE_ID" HeaderText="AGE_ID"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="AGE_NUMERO_DOCUMENTO" SortExpression="AGE_NUMERO_DOCUMENTO"
                                                        HeaderText="N&#250;mero de Documento">
                                                        <headerstyle width="20%"></headerstyle>
                                                        <itemstyle horizontalalign="Center"></itemstyle>
                                                    </asp:BoundColumn>
                                                    <asp:BoundColumn DataField="AGE_NOMBRES_APELLIDOS" SortExpression="AGE_NOMBRES_APELLIDOS"
                                                        HeaderText="Nombre">
                                                        <headerstyle width="20%"></headerstyle>
                                                    </asp:BoundColumn>
                                                    <asp:BoundColumn Visible="False" DataField="ARD_AREA_ARTISTICA" SortExpression="ARD_AREA_ARTISTICA"
                                                        HeaderText="&#193;rea Art&#237;stica">
                                                        <headerstyle width="15%"></headerstyle>
                                                        <itemstyle horizontalalign="Center"></itemstyle>
                                                    </asp:BoundColumn>
                                                    <asp:BoundColumn Visible="False" DataField="AGE_INFCOMPLETA" SortExpression="AGE_INFCOMPLETA"
                                                        HeaderText="Estado Informaci&#243;n">
                                                        <headerstyle width="15%"></headerstyle>
                                                        <itemstyle horizontalalign="Center"></itemstyle>
                                                    </asp:BoundColumn>
                                                    <asp:BoundColumn Visible="False" DataField="AGE_ESTADO" SortExpression="AGE_ESTADO">
                                                        <itemstyle horizontalalign="Center"></itemstyle>
                                                    </asp:BoundColumn>
                                                    <asp:TemplateColumn Visible="False" SortExpression="AGE_ESTADO" HeaderText="Estado Registro">
                                                        <itemtemplate>
															<anthem:Label id="lblEstadoRegistro" runat="server"></anthem:Label>
														
</itemtemplate>
                                                        <headerstyle width="18%"></headerstyle>
                                                    </asp:TemplateColumn>
                                                    <asp:BoundColumn DataField="UNI_NOMBRE" HeaderText="UNIVERSIDAD" SortExpression="UNI_NOMBRE">
                                                        <itemstyle horizontalalign="Center"></itemstyle>
                                                    </asp:BoundColumn>
                                                    <asp:BoundColumn DataField="PRG_DESCRIPCION" HeaderText="PROGRAMA" SortExpression="PRG_DESCRIPCION">
                                                        <itemstyle horizontalalign="Center"></itemstyle>
                                                    </asp:BoundColumn>
                                                </Columns>
                                                <PagerStyle CssClass="numeracion" Mode="NumericPages"></PagerStyle>
                                            </cc1:DataGridBase></div>
                                        <cc1:msgBox ID="MsgBox1" runat="server" />
                                        <anthem:Panel ID="Panel1" runat="server" AutoUpdateAfterCallBack="True" Width="100%"
                                            ScrollBars="Horizontal">
                                            </anthem:Panel>
                                            <dx:ASPxGridView ID="aspxGridAgentes" runat="server" AutoGenerateColumns="False"
                                                CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                            CssPostfix="Office2003Blue" KeyFieldName="AGE_ID"
                                                Width="100%">
                                                <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                                    CssPostfix="Office2003Blue">
                                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                    </Header>
                                                    <LoadingPanel ImageSpacing="10px">
                                                    </LoadingPanel>
                                                </Styles>
                                                <ImagesFilterControl>
                                                    <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                                                    </LoadingPanel>
                                                </ImagesFilterControl>
                                                <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                                                    <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                                                    </LoadingPanelOnStatusBar>
                                                    <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                                                    </LoadingPanel>
                                                </Images>
                                                <Columns>
                                                    <dx:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Caption="Nro"
                                                        Width="25px">
                                                        <ClearFilterButton Visible="True">
                                                        </ClearFilterButton>
                                                    </dx:GridViewCommandColumn>
                                                    <dx:GridViewDataTextColumn FieldName="AGE_ID" VisibleIndex="1" Visible="False">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="AGE_NUMERO_DOCUMENTO" VisibleIndex="1" Caption="Documento"
                                                        Width="75px">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="AGE_NOMBRES_APELLIDOS" VisibleIndex="2" Caption="Nombre"
                                                        Width="180px">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ARD_AREA_ARTISTICA" VisibleIndex="4">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="AGE_INFCOMPLETA" VisibleIndex="5">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="AGE_ESTADO" VisibleIndex="6">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="Genero" FieldName="AGE_GENERO" VisibleIndex="5"
                                                        Width="60px">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="UBICACION" FieldName="UBICACION" VisibleIndex="6"
                                                        Width="120px">
                                                    </dx:GridViewDataTextColumn>
                                                </Columns>
                                                <Settings ShowFilterRow="True" ShowGroupPanel="True" />
                                                <StylesEditors>
                                                    <ProgressBar Height="25px">
                                                    </ProgressBar>
                                                </StylesEditors>
                                                <SettingsBehavior ColumnResizeMode="Control" />
                                                <SettingsPager>
                                                    <NextPageButton Text="Next &gt;" Visible="False">
                                                    </NextPageButton>
                                                    <PrevPageButton Text="&lt; Prev" Visible="False">
                                                    </PrevPageButton>
                                                    <AllButton Visible="True" Text="All">
                                                    </AllButton>
                                                    <FirstPageButton Visible="True">
                                                    </FirstPageButton>
                                                    <LastPageButton Visible="True">
                                                    </LastPageButton>
                                                </SettingsPager>
                                                <SettingsText GroupPanel="Arrastre la columna para agrupar" />
                                            </dx:ASPxGridView>
                                        
                                        <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="aspxGridAgentes">
                                        </dx:ASPxGridViewExporter>
                                        <dx:ASPxButton ID="btnExportar" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" OnClick="btnExportar_Click" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                            Text="Exportar">
                                        </dx:ASPxButton>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
